<link href="/css/style1.css" rel="stylesheet" type="text/css" />
<link href="/css/commom.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
<link href="/css/ly_style.css" rel="stylesheet" type="text/css" />
<link href="/css/templates.css" rel="stylesheet" type="text/css" />
<link href="/images/style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="/js/jquery_min.js"></script>
<script type="text/javascript" src="/js/flag.js"></script>
<script type="text/javascript" src="/js/ChatFloat.js"></script>
<script type="text/javascript" src="/js/imagesloaded.pkgd.min.js"></script>
<script type="text/javascript" src="/js/jquery-highcharts.js"></script>
<script type="text/javascript" src="/js/touchScroll.js"></script>
<script type="text/javascript" src="/js/touchslider.dev.js"></script>
<!-- <script type="text/javascript" src="js/zepto.min.js"></script> -->
<!-- <script type="text/javascript" src="js/b5m.common.js"></script> -->
<!-- <script type="text/javascript" src="js/b5m.main.js"></script> -->
<!-- <script type="text/javascript" src="js/b5m.adv.js"></script> -->
<?php
//if (trim($wxmxopenid)!="" and is_array($vpp_user_info) and (time()-strtotime($vpp_user_info["lastlogintime"])>=1800 or time()-strtotime($vpp_user_info["mapupdate"])>=1800)){
if (trim($wxmxopenid)!="" and is_array($vpp_user_info)){
?>
<script>
if (navigator.geolocation) {
	navigator.geolocation.getCurrentPosition(function (position) {
		var coords = position.coords;
		//alert("set_vpp_user.php?weizhix="+coords.latitude+"&weizhiy="+coords.longitude);
		$.ajax({
		url: "set_vpp_user.php?weizhix="+coords.latitude+"&weizhiy="+coords.longitude,
		type: 'GET',
		dataType: 'html',
		timeout:15000,
		error: function(){
		},
		success: function(html){
			//alert(html);
		}});
		//alert(coords.latitude+'-'+coords.longitude);
	},
	function (error) {
		//处理错误
		switch (error.code) {
		case 1:
			//alert("位置服务被拒绝。");
			break;
		case 2:
			//alert("暂时获取不到位置信息。");
			break;
		case 3:
			//alert("获取信息超时。");
			break;
		default:
			//alert("未知错误。");
			break;
		}
	});
}
</script>
<?php
}
if ($head_hide!=1){
?>
<div id="ly_hd">
	<div class="ly_swipe">
				<ul id="slider">
			<?php
			$selsql="select * from mx_vpp_indexad  where yz='1' and logo<>'' order by ifhide desc,list asc,posttime desc,id desc limit 8";
			$rs=$db->excu($selsql);
			$i=0;
			$smallstr="";
			$huannum=$db->num_rows($rs);
			if ($db->num_rows($rs)>0){
				while ($rsdb=$db->fetch_array($rs)){
			?>
				<li <?php if ($i==0){echo ' style="display:block"';}?>><a href="#" onClick="return false;"><img src="<?php echo get_photourl($rsdb["logo"]);?>" alt="<?php echo $rsdb["name"]?>" style="width:100%;" /></a></li>
			<?php
				$i++;
				}
			}
			?>
				</ul>
				<div id="pagenavi">
				<?php
				for ($ii=1;$ii<=$i;$ii++){
					if ($ii==1){
						echo '<a href="javascript:void(0);" class="active"></a>';
					}
					else{
					echo "<a href=\"javascript:void(0);\"></a>";
					}
				}
				?>
				</div>
	</div>
<script type="text/javascript">
var active=0,
	as=document.getElementById('pagenavi').getElementsByTagName('a');
	
for(var i=0;i<as.length;i++){
	(function(){
		var j=i;
		as[i].onclick=function(){
			t2.slide(j);
			return false;
		}
	})();
}

var t1=new TouchScroll({id:'wrapper','width':5,'opacity':0.7,color:'#555',minLength:20});

var t2=new TouchSlider({id:'slider', speed:600, timeout:6000, before:function(index){
		as[active].className='';
		active=index;
		as[active].className='active';
	}});
</script>

</div>
<?php }?>